﻿<%@ Page Language="C#" AutoEventWireup="true" CodeFile="bz_jihuachakan.aspx.cs" Inherits="Default3" Title="未提报的计划单列表" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title></title>
    <style type="text/css">

        .style7
        {
            font-size: small;
            text-align: left;
        }
        .style21
        {
            font-size: small;
        }
        .style20
        {
            color: #FF3300;
            font-weight: bold;
            font-size: small;
        }
        </style>
</head>
<body background="images/login-bg.jpg">
    <form id="form1" runat="server">
    <div style="text-align: center">
    
    <div class="style7">
    
        <span class="style7">当前位置：</span><asp:HyperLink ID="HyperLink1" runat="server" 
            CssClass="style7" NavigateUrl="~/index.aspx" style="color: #000000" 
            ToolTip="点击返回主页面">主页面</asp:HyperLink>
        <span class="style7">→ 未提报的计划单列表</span><br class="style7" />
        <br /></div>
        <br />
        <asp:Label ID="Label2" runat="server" style="font-size: small; color: #993366; font-weight: 700" Text="特别提示：每班组每月1至10日最多只能提报10张计划单，请尽量在一张计划单内提报完该类别当月所需的所有材料。"></asp:Label>
        <br />
        <br /><b>&nbsp;&nbsp;&nbsp;&nbsp;</b><span class="style21">提报人：&nbsp;</span><asp:Label 
            ID="Label1" runat="server" style="font-size: small" Text="Label"></asp:Label>
        <b>&nbsp;&nbsp; </b>
    
        <span class="style21">当月还可新增 
        <asp:Label ID="Label3" runat="server" style="color: #FF0000; font-weight: 700" Text="0"></asp:Label>
        张计划单</span><b> 
        <asp:Button ID="Button1" runat="server" PostBackUrl="~/bz_jihuaxinzeng.aspx" 
            Text="新增计划单" style="color: #9900FF; font-weight: 700" />
        <br />
        <br />
        未提报的计划单列表<br />
        <br />
        <asp:GridView ID="GridView1" runat="server" AllowPaging="True" 
        AutoGenerateColumns="False" CellPadding="4" DataKeyNames="c_id" 
        DataSourceID="SqlDataSource1" EmptyDataText="没有未提报的计划单" 
        EnableModelValidation="True" ForeColor="#333333" GridLines="None" 
        style="text-align: center; font-size: small" 
            onrowdatabound="GridView1_RowDataBound" 
            onrowdeleted="GridView1_RowDeleted" onrowdeleting="GridView1_RowDeleting" Font-Bold="False" PageSize="20">
            <AlternatingRowStyle BackColor="White" />
            <Columns>
                <asp:CommandField ShowDeleteButton="True" HeaderText="删除" />
                <asp:TemplateField HeaderText="序号"></asp:TemplateField>
                <asp:BoundField DataField="c_id" HeaderText="编号" InsertVisible="False" 
                ReadOnly="True" SortExpression="c_id" />
                <asp:BoundField DataField="lei" HeaderText="类别" SortExpression="lei" />
                <asp:BoundField DataField="chejian" HeaderText="所属车间" 
                SortExpression="chejian" />
                <asp:BoundField DataField="banzu" HeaderText="班组" SortExpression="banzu" />
                <asp:BoundField DataField="nian" HeaderText="年" SortExpression="nian" Visible="False" />
                <asp:BoundField DataField="yue" HeaderText="月" SortExpression="yue" Visible="False" />
                <asp:BoundField DataField="addname" HeaderText="提报人" SortExpression="addname" />
                <asp:BoundField DataField="addtime" HeaderText="新增计划单时间" 
                SortExpression="addtime" />
                <asp:BoundField DataField="zt" HeaderText="zt" SortExpression="zt" 
                Visible="False" />
                <asp:HyperLinkField DataNavigateUrlFields="c_id" 
                DataNavigateUrlFormatString="bz_jihuatibao.aspx?id={0}" HeaderText="编辑提报计划" 
                Text="编辑提报计划" />
            </Columns>
            <EditRowStyle BackColor="#2461BF" />
            <FooterStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White" />
            <HeaderStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White" />
            <PagerStyle BackColor="#2461BF" ForeColor="White" HorizontalAlign="Center" />
            <RowStyle BackColor="#EFF3FB" />
            <SelectedRowStyle BackColor="#D1DDF1" Font-Bold="True" ForeColor="#333333" />
        </asp:GridView>
        <asp:SqlDataSource ID="SqlDataSource1" runat="server" 
            ConnectionString="<%$ ConnectionStrings:xxnewsConnectionString %>" 
            DeleteCommand="DELETE FROM [cailiaoguanli] WHERE [c_id] = @c_id" 
            InsertCommand="INSERT INTO [cailiaoguanli] ([lei], [chejian], [banzu], [nian], [yue], [addname], [addtime], [addip], [chejianname], [chejiantime], [chejianip], [duanname], [duantime], [duanip], [cailiaoname], [cailiaotime], [cailiaoip], [lingdaoname], [lingdaotime], [lingdaoip], [zt]) VALUES (@lei, @chejian, @banzu, @nian, @yue, @addname, @addtime, @addip, @chejianname, @chejiantime, @chejianip, @duanname, @duantime, @duanip, @cailiaoname, @cailiaotime, @cailiaoip, @lingdaoname, @lingdaotime, @lingdaoip, @zt)" 
            SelectCommand="SELECT * FROM [cailiaoguanli] WHERE (([banzu] = @banzu) AND ([zt] = @zt)) ORDER BY [addtime] DESC" 
            UpdateCommand="UPDATE [cailiaoguanli] SET [lei] = @lei, [chejian] = @chejian, [banzu] = @banzu, [nian] = @nian, [yue] = @yue, [addname] = @addname, [addtime] = @addtime, [addip] = @addip, [chejianname] = @chejianname, [chejiantime] = @chejiantime, [chejianip] = @chejianip, [duanname] = @duanname, [duantime] = @duantime, [duanip] = @duanip, [cailiaoname] = @cailiaoname, [cailiaotime] = @cailiaotime, [cailiaoip] = @cailiaoip, [lingdaoname] = @lingdaoname, [lingdaotime] = @lingdaotime, [lingdaoip] = @lingdaoip, [zt] = @zt WHERE [c_id] = @c_id">
            <DeleteParameters>
                <asp:Parameter Name="c_id" Type="Int32" />
            </DeleteParameters>
            <InsertParameters>
                <asp:Parameter Name="lei" Type="String" />
                <asp:Parameter Name="chejian" Type="String" />
                <asp:Parameter Name="banzu" Type="String" />
                <asp:Parameter Name="nian" Type="String" />
                <asp:Parameter Name="yue" Type="String" />
                <asp:Parameter Name="addname" Type="String" />
                <asp:Parameter Name="addtime" Type="DateTime" />
                <asp:Parameter Name="addip" Type="String" />
                <asp:Parameter Name="chejianname" Type="String" />
                <asp:Parameter Name="chejiantime" Type="DateTime" />
                <asp:Parameter Name="chejianip" Type="String" />
                <asp:Parameter Name="duanname" Type="String" />
                <asp:Parameter Name="duantime" Type="DateTime" />
                <asp:Parameter Name="duanip" Type="String" />
                <asp:Parameter Name="cailiaoname" Type="String" />
                <asp:Parameter Name="cailiaotime" Type="DateTime" />
                <asp:Parameter Name="cailiaoip" Type="String" />
                <asp:Parameter Name="lingdaoname" Type="String" />
                <asp:Parameter Name="lingdaotime" Type="DateTime" />
                <asp:Parameter Name="lingdaoip" Type="String" />
                <asp:Parameter Name="zt" Type="String" />
            </InsertParameters>
            <SelectParameters>
                <asp:SessionParameter Name="banzu" SessionField="pn" Type="String" />
                <asp:Parameter DefaultValue="0" Name="zt" Type="String" />
            </SelectParameters>
            <UpdateParameters>
                <asp:Parameter Name="lei" Type="String" />
                <asp:Parameter Name="chejian" Type="String" />
                <asp:Parameter Name="banzu" Type="String" />
                <asp:Parameter Name="nian" Type="String" />
                <asp:Parameter Name="yue" Type="String" />
                <asp:Parameter Name="addname" Type="String" />
                <asp:Parameter Name="addtime" Type="DateTime" />
                <asp:Parameter Name="addip" Type="String" />
                <asp:Parameter Name="chejianname" Type="String" />
                <asp:Parameter Name="chejiantime" Type="DateTime" />
                <asp:Parameter Name="chejianip" Type="String" />
                <asp:Parameter Name="duanname" Type="String" />
                <asp:Parameter Name="duantime" Type="DateTime" />
                <asp:Parameter Name="duanip" Type="String" />
                <asp:Parameter Name="cailiaoname" Type="String" />
                <asp:Parameter Name="cailiaotime" Type="DateTime" />
                <asp:Parameter Name="cailiaoip" Type="String" />
                <asp:Parameter Name="lingdaoname" Type="String" />
                <asp:Parameter Name="lingdaotime" Type="DateTime" />
                <asp:Parameter Name="lingdaoip" Type="String" />
                <asp:Parameter Name="zt" Type="String" />
                <asp:Parameter Name="c_id" Type="Int32" />
            </UpdateParameters>
        </asp:SqlDataSource>
        <br />
        <asp:Label ID="Labelnian" runat="server" Text="Label"></asp:Label>
        年 
        <asp:Label ID="Labelyue" runat="server" Text="Label"></asp:Label>
        月已提报的计划单列表<br />
        <br />
        <asp:GridView ID="GridView2" runat="server" AllowPaging="True" 
        AutoGenerateColumns="False" CellPadding="4" DataKeyNames="c_id" 
        DataSourceID="SqlDataSource2" EmptyDataText="没有已提报的计划单" 
        EnableModelValidation="True" ForeColor="#333333" GridLines="None" 
        style="text-align: center; font-size: small" 
            onrowdatabound="GridView2_RowDataBound" 
            onrowdeleted="GridView1_RowDeleted" onrowdeleting="GridView1_RowDeleting" OnDataBound="GridView2_DataBound" Font-Bold="False" PageSize="20">
            <AlternatingRowStyle BackColor="White" />
            <Columns>
                <asp:CommandField ShowDeleteButton="True" HeaderText="删除" Visible="False" />
                <asp:TemplateField HeaderText="序号"></asp:TemplateField>
                <asp:BoundField DataField="c_id" HeaderText="编号" InsertVisible="False" 
                ReadOnly="True" SortExpression="c_id" />
                <asp:BoundField DataField="lei" HeaderText="类别" SortExpression="lei" />
                <asp:BoundField DataField="chejian" HeaderText="所属车间" 
                SortExpression="chejian" />
                <asp:BoundField DataField="banzu" HeaderText="班组" SortExpression="banzu" />
                <asp:BoundField DataField="nian" HeaderText="年" SortExpression="nian" />
                <asp:BoundField DataField="yue" HeaderText="月" SortExpression="yue" />
                <asp:BoundField DataField="addname" HeaderText="提报人" SortExpression="addname" />
                <asp:BoundField DataField="addtime" HeaderText="提报时间" 
                SortExpression="addtime" />
                <asp:BoundField DataField="zt" HeaderText="zt" SortExpression="zt" 
                Visible="False" />
                <asp:HyperLinkField DataNavigateUrlFields="c_id" 
                DataNavigateUrlFormatString="showjihua.aspx?id={0}" HeaderText="查看详细计划" 
                Text="查看详细计划" Target="_blank" />
            </Columns>
            <EditRowStyle BackColor="#2461BF" />
            <FooterStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White" />
            <HeaderStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White" />
            <PagerStyle BackColor="#2461BF" ForeColor="White" HorizontalAlign="Center" />
            <RowStyle BackColor="#EFF3FB" />
            <SelectedRowStyle BackColor="#D1DDF1" Font-Bold="True" ForeColor="#333333" />
        </asp:GridView>
        <asp:SqlDataSource ID="SqlDataSource2" runat="server" 
            ConnectionString="<%$ ConnectionStrings:xxnewsConnectionString %>" 
            DeleteCommand="DELETE FROM [cailiaoguanli] WHERE [c_id] = @c_id" 
            InsertCommand="INSERT INTO [cailiaoguanli] ([lei], [chejian], [banzu], [nian], [yue], [addname], [addtime], [addip], [chejianname], [chejiantime], [chejianip], [duanname], [duantime], [duanip], [cailiaoname], [cailiaotime], [cailiaoip], [lingdaoname], [lingdaotime], [lingdaoip], [zt]) VALUES (@lei, @chejian, @banzu, @nian, @yue, @addname, @addtime, @addip, @chejianname, @chejiantime, @chejianip, @duanname, @duantime, @duanip, @cailiaoname, @cailiaotime, @cailiaoip, @lingdaoname, @lingdaotime, @lingdaoip, @zt)" 
            SelectCommand="SELECT * FROM [cailiaoguanli] WHERE (([banzu] = @banzu) AND ([zt] &lt;&gt; @zt) AND ([nian]=@nian)  AND ([yue]=@yue) )ORDER BY [addtime] DESC" 
            UpdateCommand="UPDATE [cailiaoguanli] SET [lei] = @lei, [chejian] = @chejian, [banzu] = @banzu, [nian] = @nian, [yue] = @yue, [addname] = @addname, [addtime] = @addtime, [addip] = @addip, [chejianname] = @chejianname, [chejiantime] = @chejiantime, [chejianip] = @chejianip, [duanname] = @duanname, [duantime] = @duantime, [duanip] = @duanip, [cailiaoname] = @cailiaoname, [cailiaotime] = @cailiaotime, [cailiaoip] = @cailiaoip, [lingdaoname] = @lingdaoname, [lingdaotime] = @lingdaotime, [lingdaoip] = @lingdaoip, [zt] = @zt WHERE [c_id] = @c_id">
            <DeleteParameters>
                <asp:Parameter Name="c_id" Type="Int32" />
            </DeleteParameters>
            <InsertParameters>
                <asp:Parameter Name="lei" Type="String" />
                <asp:Parameter Name="chejian" Type="String" />
                <asp:Parameter Name="banzu" Type="String" />
                <asp:Parameter Name="nian" Type="String" />
                <asp:Parameter Name="yue" Type="String" />
                <asp:Parameter Name="addname" Type="String" />
                <asp:Parameter Name="addtime" Type="DateTime" />
                <asp:Parameter Name="addip" Type="String" />
                <asp:Parameter Name="chejianname" Type="String" />
                <asp:Parameter Name="chejiantime" Type="DateTime" />
                <asp:Parameter Name="chejianip" Type="String" />
                <asp:Parameter Name="duanname" Type="String" />
                <asp:Parameter Name="duantime" Type="DateTime" />
                <asp:Parameter Name="duanip" Type="String" />
                <asp:Parameter Name="cailiaoname" Type="String" />
                <asp:Parameter Name="cailiaotime" Type="DateTime" />
                <asp:Parameter Name="cailiaoip" Type="String" />
                <asp:Parameter Name="lingdaoname" Type="String" />
                <asp:Parameter Name="lingdaotime" Type="DateTime" />
                <asp:Parameter Name="lingdaoip" Type="String" />
                <asp:Parameter Name="zt" Type="String" />
            </InsertParameters>
            <SelectParameters>
                <asp:SessionParameter Name="banzu" SessionField="pn" Type="String" />
                <asp:Parameter DefaultValue="0" Name="zt" Type="String" />
                <asp:ControlParameter ControlID="Labelnian" Name="nian" PropertyName="Text" />
                <asp:ControlParameter ControlID="Labelyue" Name="yue" PropertyName="Text" />
            </SelectParameters>
            <UpdateParameters>
                <asp:Parameter Name="lei" Type="String" />
                <asp:Parameter Name="chejian" Type="String" />
                <asp:Parameter Name="banzu" Type="String" />
                <asp:Parameter Name="nian" Type="String" />
                <asp:Parameter Name="yue" Type="String" />
                <asp:Parameter Name="addname" Type="String" />
                <asp:Parameter Name="addtime" Type="DateTime" />
                <asp:Parameter Name="addip" Type="String" />
                <asp:Parameter Name="chejianname" Type="String" />
                <asp:Parameter Name="chejiantime" Type="DateTime" />
                <asp:Parameter Name="chejianip" Type="String" />
                <asp:Parameter Name="duanname" Type="String" />
                <asp:Parameter Name="duantime" Type="DateTime" />
                <asp:Parameter Name="duanip" Type="String" />
                <asp:Parameter Name="cailiaoname" Type="String" />
                <asp:Parameter Name="cailiaotime" Type="DateTime" />
                <asp:Parameter Name="cailiaoip" Type="String" />
                <asp:Parameter Name="lingdaoname" Type="String" />
                <asp:Parameter Name="lingdaotime" Type="DateTime" />
                <asp:Parameter Name="lingdaoip" Type="String" />
                <asp:Parameter Name="zt" Type="String" />
                <asp:Parameter Name="c_id" Type="Int32" />
            </UpdateParameters>
        </asp:SqlDataSource>
        </b>
    
    </div>
    </form>
    <p class="style21" style="TEXT-ALIGN: center">
        &nbsp;<br />
        &nbsp;安康供电段信息中心制作 2015</p>
</body>
</html>
